package com.rds.workflow.service.impl;


import com.rds.workflow.domain.RdaWorkflow2NodeTempleteRel;
import com.rds.workflow.mapper.RdaWorkflow2NodeTempleteRelMapper;
import com.rds.workflow.service.IRdaWorkflow2NodeTempleteRelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class RdaWorkflow2NodeTempleteRelServiceImpl implements IRdaWorkflow2NodeTempleteRelService {

    @Autowired
    private RdaWorkflow2NodeTempleteRelMapper rdaWorkflow2NodeTempleteRelMapper;

    /**
     * 新增流程模板节点关系
     *
     * @param rdaWorkflow2NodeTempleteRel 流程模板节点关系
     * @return 结果
     */
    @Override
    public int insertRdaWorkflow2NodeTempleteRel(RdaWorkflow2NodeTempleteRel rdaWorkflow2NodeTempleteRel) {
        return rdaWorkflow2NodeTempleteRelMapper.insertRdaWorkflow2NodeTempleteRel(rdaWorkflow2NodeTempleteRel);
    }

    @Override
    public RdaWorkflow2NodeTempleteRel selectRdaWorkflow2NodeTempleteRelByid(Long id) {
        return rdaWorkflow2NodeTempleteRelMapper.selectRdaWorkflow2NodeTempleteRelByid(id);
    }

    /**
     * 查询流程模板节点关系
     *
     * @param rdaWorkflow2NodeTempleteRel 流程模板节点关系
     * @return 结果
     */
    @Override
    public List<RdaWorkflow2NodeTempleteRel> selectRdaWorkflow2NodeTempleteRelList(RdaWorkflow2NodeTempleteRel rdaWorkflow2NodeTempleteRel) {
        rdaWorkflow2NodeTempleteRel.setOperationType("Reject");
        List<RdaWorkflow2NodeTempleteRel> list=rdaWorkflow2NodeTempleteRelMapper.selectRdaWorkflow2NodeTempleteRelList(rdaWorkflow2NodeTempleteRel);
        return list;
    }

    /**
     * 批量删除
     */
    @Override
    public int deleteRdaWorkflow2NodeTempleteRel(Long[] ids) {
        return rdaWorkflow2NodeTempleteRelMapper.deleteRdaNodeTempleteByIds(ids);
    }

    @Override
    public int updateRdaWorkflow2NodeTempleteRelAll(RdaWorkflow2NodeTempleteRel rdaWorkflow2NodeTempleteRel) {
        return rdaWorkflow2NodeTempleteRelMapper.updateRdaWorkflow2NodeTempleteRelAll(rdaWorkflow2NodeTempleteRel);
    }

    @Override
    public List<RdaWorkflow2NodeTempleteRel> selectRdaWorkflow2NodeTempleteRelAllList(RdaWorkflow2NodeTempleteRel rdaWorkflow2NodeTempleteRel) {
        List<RdaWorkflow2NodeTempleteRel> list=rdaWorkflow2NodeTempleteRelMapper.selectRdaWorkflow2NodeTempleteRelList(rdaWorkflow2NodeTempleteRel);
        return list;
    }
}
